height = []
def fall(h,times):
    global height
    height.append(h)
    for i in range(0,h):
        h /= 2
        height.append(h)

def calsum():
    calsumans = 0
    for i in range(1,len(height)):
        calsumans += height[i]
    calsumans += height[0]
    return calsumans

def calup():
    return height[len(height) - 1]
def main():
    h = int(input())
    fall(h,10)
    calsumans = calsum()
    calupans = calup()
    calupans = round(calupans,4)
    print(calsumans)
    print(calupans)
main()